﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartParking.Models
{
    public class MenuItemModel : BindableBase
    {
        public int MenuId { get; set; }
        public string MenuIcon { get; set; }
        public string MenuHeader { get; set; }
        public string TargetView { get; set; }// 双击这个节点的时候打开的页面

        public int MenuType { get; set; }

        private int _parentId;

        public int ParentId
        {
            get { return _parentId; }
            set { SetProperty(ref _parentId, value); }
        }

        //public int ParentId { get; set; }
        public bool IsLastChild { get; set; }

        private bool _isExpanded;

        // 是否展开节点
        public bool IsExpanded
        {
            get { return _isExpanded; }
            set { SetProperty(ref _isExpanded, value); }
        }
        // 子节点
        public ObservableCollection<MenuItemModel> Children { get; set; } = new ObservableCollection<MenuItemModel>();
    }
}
